<template>
	<div>
<search></search>
<lefts @hello="fun"></lefts>
<keep-alive>
	<component :is="arr[index]"></component>
</keep-alive>
	</div>
</template>

<script>
import search from './fen/search.vue'
import lefts from './fen/lefts.vue'
import rights from './fen/rights.vue'
import rig from './fen/rig.vue'
import righ from './fen/righ.vue'

export default {
	data() { 
		return {
			arr: [
				"rights",
				"rig",
				"righ"
			],
			index:0
		}
	},
	methods: {
		fun(v) { 
console.log(v);
this.index=v
		}
	},
	components: {
		search,
		lefts,
		rights,
		rig,
		// rig,
		righ,
	}
}
</script>

<style>

</style>